#include "sort.h"

void InsertSort(vector<int>& vc){
  for(size_t i = 0; i<vc.size()-1; ++i)
  {
    int end = i;
    int tmp = vc[end+1];
    while(end >= 0){
      if(tmp < vc[end])
      {
        vc[end+1] = vc[end];
        --end;
      }
      else
      {
        break;
      }
    }
    vc[end+1] = tmp;
  }
}
